package org.dromara.demo.designPattern.观察者模式.service.impl;

import org.dromara.demo.designPattern.观察者模式.entity.LotteryResult;
import org.dromara.demo.designPattern.观察者模式.service.LotteryService2;
import org.dromara.demo.designPattern.观察者模式.service.MinibusTargetService;

import java.util.Date;

public class LotteryServiceImpl2 extends LotteryService2 {

    private MinibusTargetService minibusTargetService = new
            MinibusTargetService();
    @Override
    protected LotteryResult doDraw(String uId) {
        // 摇号
        String lottery = minibusTargetService.lottery(uId);
       // 结果
        return new LotteryResult(uId, lottery, new Date());
    }
}
